<!DOCTYPE html>
<html>
<head>
<title>首页</title>
<meta name="flexible" content="initial-dpr=1,maximum-dpr=3">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no">
<meta name="format-detection" content="telephone=yes">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="templates/css/index.css">
<link rel="stylesheet" href="templates/css/common.css">

<script src="templates/js/jquery-1.6.2.min.js" type="text/javascript" charset="utf-8"></script>
<script>
    function change_html(){
        var font_size=$(window).width()/16;
        if(font_size > 40){
            font_size = 40;
        }
        $("html").css('font-size',font_size);
    }
    window.onresize=function(){
        change_html();
    }
    change_html();
</script>
</head>
<body>
<!-- txx头部 -->
<header>
  <ul class="head">
    <li class="menu" id="menu">
      <img src="templates/img/menu.png" id="menu_img">
      <ul class="hide_menu">
        <li><a href="index.php">首页</a></li>
        {foreach from=$pcat_array item=pcat_data}
        <li><a href="category.php?c_id={$pcat_data.id}">{$pcat_data.name}</a></li>
        {/foreach}
      </ul>
    </li>
    <li class="logo">
      <img src='{$wap_logo|default:../images/wap_logo.png}' alt='LOGO' />
    </li>
    <li class="menu" id="package">
      <img src="templates/img/package.png">
      <div class="demo"></div>
      <ul class="hide_package">
        <li id="packages"><a href="flow.php">购物袋</a></li>
        <li id="account"><a href="user.php?act=account_log">账户</a></li>
        <li id="user">
          {if $user_name}
          <a href="user.php?act=user_center">个人中心</a>
          {else}
          <a href="user.php?act=login">登录</a>
          {/if}
        </li>
      </ul>
    </li>
    <div class="clear"></div>
  </ul>
</header>
<!-- txx内容 -->
<div class="content">
  <!--广告调用 id为1-->
  {$banner}


  <ul class="btm_nav">
    <li><a href="user.php?act=account_log">账户</a></li>

    {if $article_array}
{foreach from=$article_array item=article_data}
<li><a href='article.php?act=detail&amp;a_id={$article_data.article_id}'>{$article_data.title}</a></li>
{/foreach}
{/if}

  
  </ul>
</div>
<!-- txx版权 -->
<p class="copyright">Copyright@2018-2019爱果者保留所有权利</p>
<!-- txx底部 -->
<div class="btm_div">
  <ul>
    <li id="index"><a href="index.php">首页</a></li>
    <li id="category"><a href="category.php">分类</a></li>
    <li id="car"><a href="flow.php">购物车</a></li>
    <li id="user_home"><a href="user.php?act=user_center">个人中心</a></li>
  </ul>
</div>
<script type="text/javascript">
  $(function(){
    /*txx菜单切换*/
    $('#menu').click(function(){
      $('.hide_menu').toggle();
      if($("#menu_img").attr("src")=="templates/img/menu.png"){
          $("#menu_img").attr("src","templates/img/close.png");
        }else{
          $("#menu_img").attr("src","templates/img/menu.png");
        }
    })
    /*txx购物包切换*/
    $('#package').click(function(){
      $('.hide_package,.demo').toggle();
    })
  })
</script>
</body>
</html>